<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>js的dom操作</title>
</head>
<body>

<script>
  //获得浏览器可视窗口的宽度
  var w = window.innerWidth;
  console.log(w);
  //获得浏览器可视窗口的高度
  var h = window.innerHeight;
  console.log(h);
</script>
</body>
</html>